﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace WebControls_NumGen
{
    public partial class NumGenForm : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void TextBox1_TextChanged(object sender, EventArgs e)
        {

        }

        protected void ButtonGenerator_Click(object sender, EventArgs e)
        {
            int a = int.Parse(TextBoxLeft.Text);
            int b = int.Parse(TextBoxRight.Text);

            Random r = new Random();
            int d = r.Next(a, b);

            TextBoxRight.Text = "" + d;
        }
    }
}